package galaxies.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

public class SpiralArmNumbers {
	
	private HashMap<String, Integer> spiralArmNumbers = new HashMap<String, Integer>();
	private ArrayList<String> entries = new ArrayList<String>();
	
	public ArrayList<String> getEntries() {
		return this.entries;
	}
	
	public void addSpiralArmNumber(String ref, Integer minTiles) {
		this.spiralArmNumbers.put(ref, minTiles);
		this.entries.add(ref);
	}
	
	public int getSpiralArmNumber(String ref) {
		return spiralArmNumbers.get(ref);
	}
	
	public HashMap<String, Integer> getSpiralArmNumbers() {
		return this.spiralArmNumbers;
	}
	
	public void setSpiralArmNumbers(HashMap<String, Integer> spiralArmNumbers) {
		this.spiralArmNumbers.clear();
		this.spiralArmNumbers = spiralArmNumbers;
		
		for (Map.Entry<String, Integer> entry : spiralArmNumbers.entrySet()) {
			entries.add(entry.getKey());
		}
	}

}
